<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@taglib prefix="p" uri="http://primefaces.prime.com.tr/ui"%>

<f:view>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Organizer Project</title>
            <p:resources />
        </head>
        <body>
            <p:growl id="aviso" />
            <p:panel header="Editar Usuário" style="width: 320px">             
                <h:form>
                    <h:panelGrid columns="2">
                           <h:outputLabel value="Login"/>
                           <h:outputText value="#{loginManegedBean.usuario.login}" id="login"/>
                           <h:outputLabel value="Senha"/>
                           <p:password id="senhaFeedback" value="#{usuarioManegedBean.usuario.senha}" promptLabel="Digite uma senha segura!" goodLabel="Boa" weakLabel="Razoável" strongLabel="Excelente" maxlength="8" minLength="6" required="true" requiredMessage="Por favor, informe a SENHA."/>
                           <h:outputLabel value="Nome"/>
                           <h:inputText value ="#{usuarioManegedBean.usuario.nomeUsuario}" id="nome" required="true" requiredMessage="Por favor, informe o NOME."/>
                           <h:outputLabel value="Email"/>
                           <h:inputText value="#{usuarioManegedBean.usuario.email}" id="email" required="true" requiredMessage="Por favor, informe o EMAIL."/>
                           <h:outputLabel value="Telefone"/>
                           <p:inputMask value="#{usuarioManegedBean.usuario.telefone}" mask="(99)9999-9999" required="true" requiredMessage="Por favor, informe o TELEFONE."/>
                     </h:panelGrid><br/>
                    <p:commandButton action="#{usuarioManegedBean.fimEditar}" value="Salvar" update="aviso" ajax="false"/>
               </h:form>
            </p:panel>
        </body>
    </html>  
</f:view>